package cn.uc.util;

import java.io.File;
import java.util.ArrayList;

public class FileUtil {
    public static ArrayList<String> getAllImageFiles(String root){
        ArrayList<String> paths = new ArrayList<String>();
        File f=new File(root);
        File[] files=f.listFiles();
        for(int i=files.length-1; i>=0; i--){
          File file = files[i];
          String path = file.getAbsolutePath();
          if(path.endsWith(".png") || path.endsWith(".jpg")){
              paths.add(path);
          }
        }
        
        return paths;
    }
}
